pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut a = 0;
    let mut b = 1;
    let mut even_count = 0;
    
    while a <= threshold && b <= threshold{
        a = a + b;
        b = a + b;
        if a<= threshold && a % 2 == 0 {
            even_count += a;
        }
        if b<= threshold && b % 2 == 0 {
            even_count += b;
        }
    }
    if a <= threshold && b >= threshold{
        a + b - 1 - even_count 
    }else{
        b - 1 - even_count 
    }
}
